using System;
using System.Linq;

namespace Thunder
{
	public static class ArrayExtensions
	{
		public static T[] Concat<T>(this T[] arr, params T[] addArr)
        {
            T[] tmpArr = new T[arr.Length + addArr.Length];
            
            for (int i = 0; i < arr.Length; ++i)
                tmpArr[i] = arr[i];
            for (int i = arr.Length, j = 0; j < addArr.Length; ++i, ++j)
                tmpArr[i] = addArr[j];
                
            return tmpArr;
        }
		
		public static void Resize<T>(this T[] arr, int newSize)
		{
			Array.Resize(ref arr, newSize);
		}
	}
}

